package com.entity;

/**
 * 购物项类：商品、商品数量、商品价格
 * 
 * @author anneli
 * @date 2019年10月14日 下午3:13:12
 *
 */
public class CartItem {
	private Pets pets;// 商品
	private int count;// 商品数量
	private int price;// 总价
	
	public CartItem() {
	}

	public CartItem(Pets pets, int count) {
		super();
		this.pets = pets;
		this.count = count;
		this.price = this.pets.getDiscountprice()* count;
	}

	public Pets getPets() {
		return pets;
	}

	public void setPets(Pets pets) {
		this.pets = pets;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		
		this.count = count;
		this.price =this.pets.getDiscountprice() * count;
		
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

}
